100
How do I enable the cross link support ( rectangular )

public void init()
{
	COM com_Element,com_Element1,com_Elements,com_Link,com_Link1,com_Link2,com_Links;
	anytype var_Element,var_Element1,var_Elements,var_Link,var_Link1,var_Link2,var_Links;
	;

	super();

	var_Elements = exsurface1.Elements(); com_Elements = var_Elements;
		com_Elements.Add("Element <sha ;;0>A");
		com_Elements.Add("Element <sha ;;0>B",COMVariant::createFromInt(0),COMVariant::createFromInt(76));
		var_Element = com_Elements.Add("Element <sha ;;0>C",COMVariant::createFromInt(-76),COMVariant::createFromInt(32)); com_Element = var_Element;
			com_Element.AutoSize(false);
			com_Element.Height(32);
		var_Element1 = com_Elements.Add("Element <sha ;;0>D",COMVariant::createFromInt(76),COMVariant::createFromInt(32)); com_Element1 = var_Element1;
			com_Element1.AutoSize(false);
			com_Element1.Height(32);
	var_Links = exsurface1.Links(); com_Links = var_Links;
		var_Link = com_Links.Add(COM::createFromObject(exsurface1.Elements()).Item(COMVariant::createFromInt(1)),COM::createFromObject(exsurface1.Elements()).Item(COMVariant::createFromInt(2))); com_Link = var_Link;
			com_Link.StartPos(1/*CenterAlignment*/);
			com_Link.EndPos(1/*CenterAlignment*/);
		var_Link1 = com_Links.Add(COM::createFromObject(exsurface1.Elements()).Item(COMVariant::createFromInt(2)),COM::createFromObject(exsurface1.Elements()).Item(COMVariant::createFromInt(1))); com_Link1 = var_Link1;
			com_Link1.StartPos(1/*CenterAlignment*/);
			com_Link1.EndPos(1/*CenterAlignment*/);
		com_Links.Add(COM::createFromObject(exsurface1.Elements()).Item(COMVariant::createFromInt(3)),COM::createFromObject(exsurface1.Elements()).Item(COMVariant::createFromInt(4)));
		var_Link2 = com_Links.Add(COM::createFromObject(exsurface1.Elements()).Item(COMVariant::createFromInt(4)),COM::createFromObject(exsurface1.Elements()).Item(COMVariant::createFromInt(3))); com_Link2 = var_Link2;
			com_Link2.StartPos(0/*LeftAlignment*/);
			com_Link2.EndPos(2/*RightAlignment*/);
	exsurface1.ShowLinks(33/*exShowCrossLinksRect | exShowExtendedLinks*/);
}
99
How do I show a link frmo bottom to top, or reverse, not from left to right

public void init()
{
	COM com_Elements,com_Link,com_Links;
	anytype var_Elements,var_Link,var_Links;
	;

	super();

	var_Elements = exsurface1.Elements(); com_Elements = var_Elements;
		com_Elements.Add("Element <sha ;;0>A");
		com_Elements.Add("Element <sha ;;0>B",COMVariant::createFromInt(0),COMVariant::createFromInt(64));
	var_Links = exsurface1.Links(); com_Links = var_Links;
		var_Link = com_Links.Add(COM::createFromObject(exsurface1.Elements()).Item(COMVariant::createFromInt(1)),COM::createFromObject(exsurface1.Elements()).Item(COMVariant::createFromInt(2))); com_Link = var_Link;
			com_Link.StartPos(1/*CenterAlignment*/);
			com_Link.EndPos(1/*CenterAlignment*/);
}
98
What options to align the elements do I have if I use Arrange method

public void init()
{
	COM com_Elements,com_Links;
	COMVariant h1,h2,h3;
	anytype var_Elements,var_Links;
	;

	super();

	exsurface1.BeginUpdate();
	exsurface1.ShowGridLines(true);
	var_Elements = exsurface1.Elements(); com_Elements = var_Elements;
		h1 = com_Elements.Add("Top Alignment").ID();
		com_Elements.Add("Element");
		com_Elements.Add("Element");
		com_Elements.Add("Element");
		h2 = com_Elements.Add("Center Alignment",,COMVariant::createFromInt(96)).ID();
		com_Elements.Add("Element",,COMVariant::createFromInt(96));
		com_Elements.Add("Element",,COMVariant::createFromInt(96));
		com_Elements.Add("Element",,COMVariant::createFromInt(96));
		h3 = com_Elements.Add("Bottom Alignment",,COMVariant::createFromInt(178)).ID();
		com_Elements.Add("Element",,COMVariant::createFromInt(192));
		com_Elements.Add("Element",,COMVariant::createFromInt(192));
		com_Elements.Add("Element",,COMVariant::createFromInt(192));
	var_Links = exsurface1.Links(); com_Links = var_Links;
		com_Links.Add(COM::createFromObject(exsurface1.Elements()).Item(COMVariant::createFromInt(1)),COM::createFromObject(exsurface1.Elements()).Item(COMVariant::createFromInt(2)));
		com_Links.Add(COM::createFromObject(exsurface1.Elements()).Item(COMVariant::createFromInt(1)),COM::createFromObject(exsurface1.Elements()).Item(COMVariant::createFromInt(3)));
		com_Links.Add(COM::createFromObject(exsurface1.Elements()).Item(COMVariant::createFromInt(2)),COM::createFromObject(exsurface1.Elements()).Item(COMVariant::createFromInt(4)));
		com_Links.Add(COM::createFromObject(exsurface1.Elements()).Item(COMVariant::createFromInt(2)),COM::createFromObject(exsurface1.Elements()).Item(COMVariant::createFromInt(3)));
		com_Links.Add(COM::createFromObject(exsurface1.Elements()).Item(COMVariant::createFromInt(5)),COM::createFromObject(exsurface1.Elements()).Item(COMVariant::createFromInt(6)));
		com_Links.Add(COM::createFromObject(exsurface1.Elements()).Item(COMVariant::createFromInt(5)),COM::createFromObject(exsurface1.Elements()).Item(COMVariant::createFromInt(7)));
		com_Links.Add(COM::createFromObject(exsurface1.Elements()).Item(COMVariant::createFromInt(6)),COM::createFromObject(exsurface1.Elements()).Item(COMVariant::createFromInt(8)));
		com_Links.Add(COM::createFromObject(exsurface1.Elements()).Item(COMVariant::createFromInt(6)),COM::createFromObject(exsurface1.Elements()).Item(COMVariant::createFromInt(7)));
		com_Links.Add(COM::createFromObject(exsurface1.Elements()).Item(COMVariant::createFromInt(9)),COM::createFromObject(exsurface1.Elements()).Item(COMVariant::createFromInt(10)));
		com_Links.Add(COM::createFromObject(exsurface1.Elements()).Item(COMVariant::createFromInt(9)),COM::createFromObject(exsurface1.Elements()).Item(COMVariant::createFromInt(11)));
		com_Links.Add(COM::createFromObject(exsurface1.Elements()).Item(COMVariant::createFromInt(10)),COM::createFromObject(exsurface1.Elements()).Item(COMVariant::createFromInt(12)));
		com_Links.Add(COM::createFromObject(exsurface1.Elements()).Item(COMVariant::createFromInt(10)),COM::createFromObject(exsurface1.Elements()).Item(COMVariant::createFromInt(11)));
	exsurface1.DefArrange(3/*exDefArrangeAlign*/,COMVariant::createFromInt(0));
	exsurface1.Arrange(h1);
	exsurface1.DefArrange(3/*exDefArrangeAlign*/,COMVariant::createFromInt(1));
	exsurface1.Arrange(h2);
	exsurface1.DefArrange(3/*exDefArrangeAlign*/,COMVariant::createFromInt(2));
	exsurface1.Arrange(h3);
	exsurface1.EndUpdate();
}
97
Is there an auto-arrange feature that will display the flow-chart centered and zoomed correctly after we are finished building it

public void init()
{
	COM com_Element,com_Elements,com_Links;
	anytype var_Element,var_Elements,var_Links;
	;

	super();

	var_Elements = exsurface1.Elements(); com_Elements = var_Elements;
		var_Element = COM::createFromObject(com_Elements.Add("Element A")); com_Element = var_Element;
		com_Element.ID("A");
		var_Element = COM::createFromObject(com_Elements.Add("Element B")); com_Element = var_Element;
		com_Element.ID("B");
		var_Element = COM::createFromObject(com_Elements.Add("Element C")); com_Element = var_Element;
		com_Element.ID("C");
		var_Element = COM::createFromObject(com_Elements.Add("Element D")); com_Element = var_Element;
		com_Element.ID("D");
	var_Links = exsurface1.Links(); com_Links = var_Links;
		com_Links.Add(COM::createFromObject(exsurface1.Elements()).Item("A"),COM::createFromObject(exsurface1.Elements()).Item("B"));
		com_Links.Add(COM::createFromObject(exsurface1.Elements()).Item("A"),COM::createFromObject(exsurface1.Elements()).Item("C"));
		com_Links.Add(COM::createFromObject(exsurface1.Elements()).Item("B"),COM::createFromObject(exsurface1.Elements()).Item("D"));
		com_Links.Add(COM::createFromObject(exsurface1.Elements()).Item("B"),COM::createFromObject(exsurface1.Elements()).Item("C"));
	exsurface1.Arrange();
}
96
Is it possible to change the distance between elements, when calling the Arrange method

public void init()
{
	COM com_Element,com_Elements,com_Links;
	anytype var_Element,var_Elements,var_Links;
	;

	super();

	var_Elements = exsurface1.Elements(); com_Elements = var_Elements;
		var_Element = COM::createFromObject(com_Elements.Add("Element A")); com_Element = var_Element;
		com_Element.ID("A");
		var_Element = COM::createFromObject(com_Elements.Add("Element B")); com_Element = var_Element;
		com_Element.ID("B");
		var_Element = COM::createFromObject(com_Elements.Add("Element C")); com_Element = var_Element;
		com_Element.ID("C");
		var_Element = COM::createFromObject(com_Elements.Add("Element D")); com_Element = var_Element;
		com_Element.ID("D");
	var_Links = exsurface1.Links(); com_Links = var_Links;
		com_Links.Add(COM::createFromObject(exsurface1.Elements()).Item("A"),COM::createFromObject(exsurface1.Elements()).Item("B"));
		com_Links.Add(COM::createFromObject(exsurface1.Elements()).Item("A"),COM::createFromObject(exsurface1.Elements()).Item("C"));
		com_Links.Add(COM::createFromObject(exsurface1.Elements()).Item("B"),COM::createFromObject(exsurface1.Elements()).Item("D"));
		com_Links.Add(COM::createFromObject(exsurface1.Elements()).Item("B"),COM::createFromObject(exsurface1.Elements()).Item("C"));
	exsurface1.DefArrange(1/*exDefArrangeDX*/,COMVariant::createFromInt(0));
	exsurface1.DefArrange(2/*exDefArrangeDY*/,COMVariant::createFromInt(0));
	exsurface1.Arrange();
}
95
How do I organize vertically the elements

public void init()
{
	COM com_Element,com_Elements,com_Links;
	anytype var_Element,var_Elements,var_Links;
	;

	super();

	var_Elements = exsurface1.Elements(); com_Elements = var_Elements;
		var_Element = COM::createFromObject(com_Elements.Add("Element A")); com_Element = var_Element;
		com_Element.ID("A");
		var_Element = COM::createFromObject(com_Elements.Add("Element B")); com_Element = var_Element;
		com_Element.ID("B");
		var_Element = COM::createFromObject(com_Elements.Add("Element C")); com_Element = var_Element;
		com_Element.ID("C");
		var_Element = COM::createFromObject(com_Elements.Add("Element D")); com_Element = var_Element;
		com_Element.ID("D");
	var_Links = exsurface1.Links(); com_Links = var_Links;
		com_Links.Add(COM::createFromObject(exsurface1.Elements()).Item("A"),COM::createFromObject(exsurface1.Elements()).Item("B"));
		com_Links.Add(COM::createFromObject(exsurface1.Elements()).Item("A"),COM::createFromObject(exsurface1.Elements()).Item("C"));
		com_Links.Add(COM::createFromObject(exsurface1.Elements()).Item("B"),COM::createFromObject(exsurface1.Elements()).Item("D"));
		com_Links.Add(COM::createFromObject(exsurface1.Elements()).Item("B"),COM::createFromObject(exsurface1.Elements()).Item("C"));
	exsurface1.ShowLinksType(2/*exLinkStraight*/);
	exsurface1.DefArrange(0/*exDefArrangeDir*/,COMVariant::createFromInt(1));
	exsurface1.Arrange();
}
94
Is there a way to create a link which has the same start and end element

public void init()
{
	COM com_Elements,com_Links;
	anytype var_Elements,var_Links;
	;

	super();

	var_Elements = exsurface1.Elements(); com_Elements = var_Elements;
		com_Elements.Add("Element");
	var_Links = exsurface1.Links(); com_Links = var_Links;
		com_Links.Add(COM::createFromObject(exsurface1.Elements()).Item(COMVariant::createFromInt(1)),COM::createFromObject(exsurface1.Elements()).Item(COMVariant::createFromInt(1)));
}
93
How can I prevent hiding the item when an item with an outgoing link, is collapsed

public void init()
{
	COM com_Element,com_Elements,com_Links;
	anytype var_Element,var_Elements,var_Links;
	;

	super();

	var_Elements = exsurface1.Elements(); com_Elements = var_Elements;
		var_Element = COM::createFromObject(com_Elements.Add("Item <sha ;;0>1")); com_Element = var_Element;
		com_Element.ID(COMVariant::createFromInt(1));
		var_Element = COM::createFromObject(com_Elements.Insert("Item <sha ;;0>2",COMVariant::createFromInt(1))); com_Element = var_Element;
		com_Element.ID(COMVariant::createFromInt(2));
		var_Element = com_Elements.Add("Item <sha ;;0>3"); com_Element = var_Element;
			com_Element.ID(COMVariant::createFromInt(3));
			com_Element.X(96);
			com_Element.Y(23);
	var_Links = exsurface1.Links(); com_Links = var_Links;
		com_Links.Add(COM::createFromObject(exsurface1.Elements()).Item(COMVariant::createFromInt(2)),COM::createFromObject(exsurface1.Elements()).Item(COMVariant::createFromInt(3)));
	exsurface1.ShowLinksOnCollapse(true);
}
92
How can I change the toolbar's visual appearance

public void init()
{
	;

	super();

	exsurface1.VisualAppearance().Add(1,"c:\\exontrol\\images\\normal.ebn");
	exsurface1.Background(148/*exToolBarAppearance*/,0x1000000);
	exsurface1.Background(149/*exToolBarBackColor*/,WinApi::RGB2int(255,255,255));
	exsurface1.Background(150/*exToolBarForeColor*/,WinApi::RGB2int(40,40,40));
	exsurface1.Background(153/*exToolBarButtonDownBackColor*/,0x1606060);
	exsurface1.Background(154/*exToolBarButtonDownForeColor*/,WinApi::RGB2int(240,240,240));
	exsurface1.Background(155/*exToolBarButtonHotBackColor*/,0x1a0a0a0);
	exsurface1.Background(156/*exToolBarButtonHotForeColor*/,WinApi::RGB2int(255,255,255));
}
91
How can I change the toolbar's background color

public void init()
{
	;

	super();

	exsurface1.Background(149/*exToolBarBackColor*/,WinApi::RGB2int(255,255,255));
}
90
How can I fit or ensure that all elements are in the control's client area
public void init()
{
	COM com_Element,com_Elements;
	anytype var_Element,var_Elements;
	;

	super();

	var_Elements = exsurface1.Elements(); com_Elements = var_Elements;
		var_Element = COM::createFromObject(com_Elements.Add("Element A",COMVariant::createFromInt(-500),COMVariant::createFromInt(-500))); com_Element = var_Element;
		com_Element.BackColor(WinApi::RGB2int(0,255,0));
		var_Element = COM::createFromObject(com_Elements.Add("Element B",COMVariant::createFromInt(500),COMVariant::createFromInt(500))); com_Element = var_Element;
		com_Element.BackColor(WinApi::RGB2int(255,0,0));
		com_Elements.Add("Element C",COMVariant::createFromInt(48),COMVariant::createFromInt(24));
	exsurface1.FitToClient();
}
89
When I use the context menu to insert an image, the size seems to be fixed to 32 pixels. How can I control / change this

// CreateElement event - The user creates at runtime a new element.
void onEvent_CreateElement(COM   _Element)
{
	// Element.Edit(0,"multiline,wordwrap")
	// Element.AutoSize = True
	;
	print( "Call Edit(0) method of the Element object" );
}

// RClick event - Occurs once the user right clicks the control.
void onEvent_RClick()
{
	// SelElement(0).Edit(0,"multiline,wordwrap")
	;
	exsurface1.Selection(COM::createFromVariant(exsurface1.ElementFromPoint(-1,-1)));
	print( "Call Edit(0) method of the SelElement(0) property" );
}

public void init()
{
	COM com_Element,com_Elements;
	anytype var_Element,var_Elements;
	str var_s;
	;

	super();

	exsurface1.VisualAppearance().Add(1,"c:\\exontrol\\images\\normal.ebn");
	exsurface1.VisualAppearance().Add(3,"c:\\exontrol\\images\\hot.ebn");
	exsurface1.Background(99/*exContextMenuAppearance*/,0x1000000);
	exsurface1.Background(102/*exContextMenuSelBackColor*/,0x1fcddc0);
	exsurface1.Background(88/*exElementBorderColor*/,0x3000000);
	exsurface1.SelectObjectColor(WinApi::RGB2int(192,221,252));
	exsurface1.HTMLPicture("pic1","c:\\exontrol\\images\\zipdisk.gif");
	exsurface1.HTMLPicture("pic2","c:\\exontrol\\images\\auction.gif");
	exsurface1.HTMLPicture("pic3","c:\\exontrol\\images\\colorize.gif");
	var_Elements = exsurface1.Elements(); com_Elements = var_Elements;
		var_Element = COM::createFromObject(com_Elements.Add("Element A")); com_Element = var_Element;
		com_Element.ID("A");
		var_Element = com_Elements.Add("Custom-size pictures:<br><img>pic1:24</img>,<img>pic2:48</img> ,... and so on.",COMVariant::createFromInt(96),COMVariant::createFromInt(48)); com_Element = var_Element;
			com_Element.ID("B");
			com_Element.CaptionSingleLine(false);
		com_Elements.Add("Element C",COMVariant::createFromInt(48),COMVariant::createFromInt(24));
	var_s = "Size[id=57680][edittype=515][border=0][min=16][max=128][freq=16][editwidth=-128][ticklabel=value = %i ? '<b>'+value : ( value = ";
	var_s = var_s + "vmax ? '<fgcolor 808080><font ;6><b>'+value : ( value = vmin ? '<fgcolor 808080><font ;6><b>'+value : '' ) )],Insert[group=3](<i";
	var_s = var_s + "mg>pic1:32</img>[id=57763],<img>pic2:32</img>[id=57763],Others[id=1000](default[group=3](<img>pic3</img>[id=57763]),<font ;6>oth";
	var_s = var_s + "er sizes[sep],<img>pic3:16</img>[id=57763],<img>pic3:32</img>[id=57763],<img>pic3:64</img>[id=57763]))";
	exsurface1.EditContextMenuItems(var_s);
}
88
Can I add images to node while editing the node using the Edit method

// CreateElement event - The user creates at runtime a new element.
void onEvent_CreateElement(COM   _Element)
{
	// Element.Edit(0,"multiline,wordwrap")
	// Element.AutoSize = True
	;
	print( "Call Edit(0) method of the Element object" );
}

// RClick event - Occurs once the user right clicks the control.
void onEvent_RClick()
{
	// SelElement(0).Edit(0,"multiline,wordwrap")
	;
	exsurface1.Selection(COM::createFromVariant(exsurface1.ElementFromPoint(-1,-1)));
	print( "Call Edit(0) method of the SelElement(0) property" );
}

public void init()
{
	COM com_Element,com_Element1,com_Elements;
	anytype var_Element,var_Element1,var_Elements;
	str var_s;
	;

	super();

	exsurface1.VisualAppearance().Add(1,"c:\\exontrol\\images\\normal.ebn");
	exsurface1.Background(99/*exContextMenuAppearance*/,0x1000000);
	exsurface1.Background(102/*exContextMenuSelBackColor*/,0x10000ff);
	exsurface1.SelectObjectStyle(-1/*exNoLines*/);
	exsurface1.SelectObjectColor(WinApi::RGB2int(192,221,252));
	exsurface1.HTMLPicture("pic1","c:\\exontrol\\images\\zipdisk.gif");
	exsurface1.HTMLPicture("pic2","c:\\exontrol\\images\\auction.gif");
	var_s = "gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTql";
	var_s = var_s + "Vq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0";
	var_s = var_s + "ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/yN";
	var_s = var_s + "AOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=";
	exsurface1.Images(COMVariant::createFromStr(var_s));
	var_Elements = exsurface1.Elements(); com_Elements = var_Elements;
		var_Element = COM::createFromObject(com_Elements.Add("Element A")); com_Element = var_Element;
		com_Element.ID("A");
		var_Element = com_Elements.Add("This is a node that displays pictures:<br><img>pic1:48</img>,<img>pic2:48</img> ,... and so on.",COMVariant::createFromInt(96),COMVariant::createFromInt(48)); com_Element = var_Element;
			com_Element.ID("B");
			com_Element.CaptionSingleLine(false);
		var_Element1 = COM::createFromObject(com_Elements.Add("Element C",COMVariant::createFromInt(48),COMVariant::createFromInt(24))); com_Element1 = var_Element1;
		com_Element1.BackColor(WinApi::RGB2int(255,255,255));
}
87
I am using the Edit method to edit the node, but still not able to display multiple lines. Is this possible

// CreateElement event - The user creates at runtime a new element.
void onEvent_CreateElement(COM   _Element)
{
	// Element.Edit(0,"multiline,wordwrap")
	// Element.AutoSize = True
	;
	print( "Call Edit(0) method of the Element object" );
}

// RClick event - Occurs once the user right clicks the control.
void onEvent_RClick()
{
	// SelElement(0).Edit(0,"multiline,wordwrap")
	;
	exsurface1.Selection(COM::createFromVariant(exsurface1.ElementFromPoint(-1,-1)));
	print( "Call Edit(0) method of the SelElement(0) property" );
}

public void init()
{
	COM com_Element,com_Element1,com_Elements;
	anytype var_Element,var_Element1,var_Elements;
	;

	super();

	exsurface1.VisualAppearance().Add(1,"c:\\exontrol\\images\\normal.ebn");
	exsurface1.Background(99/*exContextMenuAppearance*/,0x1000000);
	exsurface1.Background(102/*exContextMenuSelBackColor*/,0x10000ff);
	exsurface1.SelectObjectStyle(-1/*exNoLines*/);
	exsurface1.SelectObjectColor(WinApi::RGB2int(192,221,252));
	var_Elements = exsurface1.Elements(); com_Elements = var_Elements;
		var_Element = COM::createFromObject(com_Elements.Add("Element A")); com_Element = var_Element;
		com_Element.ID("A");
		var_Element = com_Elements.Add("Right-<b>Click</b> the node to edit it.",COMVariant::createFromInt(96),COMVariant::createFromInt(48)); com_Element = var_Element;
			com_Element.ID("B");
			com_Element.CaptionSingleLine(false);
		var_Element1 = COM::createFromObject(com_Elements.Add("Element C",COMVariant::createFromInt(48),COMVariant::createFromInt(24))); com_Element1 = var_Element1;
		com_Element1.BackColor(WinApi::RGB2int(255,255,255));
}
86
How can I change the visual appearance of the edit's context menu

// CreateElement event - The user creates at runtime a new element.
void onEvent_CreateElement(COM   _Element)
{
	// Element.Edit(0)
	// Element.AutoSize = True
	;
	print( "Call Edit(0) method of the Element object" );
}

// RClick event - Occurs once the user right clicks the control.
void onEvent_RClick()
{
	// SelElement(0).Edit(0)
	;
	exsurface1.Selection(COM::createFromVariant(exsurface1.ElementFromPoint(-1,-1)));
	print( "Call Edit(0) method of the SelElement(0) property" );
}

public void init()
{
	COM com_Element,com_Elements;
	anytype var_Element,var_Elements;
	;

	super();

	exsurface1.VisualAppearance().Add(1,"c:\\exontrol\\images\\normal.ebn");
	exsurface1.Background(99/*exContextMenuAppearance*/,0x1000000);
	exsurface1.Background(102/*exContextMenuSelBackColor*/,0x10000ff);
	exsurface1.SelectObjectStyle(-1/*exNoLines*/);
	exsurface1.SelectObjectColor(WinApi::RGB2int(192,221,252));
	var_Elements = exsurface1.Elements(); com_Elements = var_Elements;
		var_Element = COM::createFromObject(com_Elements.Add("Element A")); com_Element = var_Element;
		com_Element.ID("A");
		var_Element = COM::createFromObject(com_Elements.Add("Right-Click to edit this node",COMVariant::createFromInt(96),COMVariant::createFromInt(48))); com_Element = var_Element;
		com_Element.ID("B");
		var_Element = COM::createFromObject(com_Elements.Add("Element C",COMVariant::createFromInt(48),COMVariant::createFromInt(24))); com_Element = var_Element;
		com_Element.BackColor(WinApi::RGB2int(255,255,255));
}
85
How can I edit the node once the user right-click the element

// CreateElement event - The user creates at runtime a new element.
void onEvent_CreateElement(COM   _Element)
{
	// Element.Edit(0)
	// Element.AutoSize = True
	;
	print( "Call Edit(0) method of the Element object" );
}

// RClick event - Occurs once the user right clicks the control.
void onEvent_RClick()
{
	// SelElement(0).Edit(0)
	;
	exsurface1.Selection(COM::createFromVariant(exsurface1.ElementFromPoint(-1,-1)));
	print( "Call Edit(0) method of the SelElement(0) property" );
}

public void init()
{
	COM com_Element,com_Elements;
	anytype var_Element,var_Elements;
	;

	super();

	var_Elements = exsurface1.Elements(); com_Elements = var_Elements;
		var_Element = COM::createFromObject(com_Elements.Add("Element A")); com_Element = var_Element;
		com_Element.ID("A");
		var_Element = COM::createFromObject(com_Elements.Add("Element B",COMVariant::createFromInt(96),COMVariant::createFromInt(48))); com_Element = var_Element;
		com_Element.ID("B");
		var_Element = COM::createFromObject(com_Elements.Add("Element C",COMVariant::createFromInt(48),COMVariant::createFromInt(24))); com_Element = var_Element;
		com_Element.BackColor(WinApi::RGB2int(255,255,255));
}
84
I wish to return the name that is displayed in the Element that I have selected

// SelectionChanged event - Notifies your application that the control's selection has been changed.
void onEvent_SelectionChanged()
{
	;
	print( "The number of selected elements is: " );
	print( exsurface1.SelCount() );
	print( exsurface1.SelElement(0).Caption() );
}

public void init()
{
	COM com_Element,com_Elements;
	anytype var_Element,var_Elements;
	;

	super();

	exsurface1.HideSel(false);
	exsurface1.SelectObjectColorInactive(exsurface1.SelectObjectColor());
	exsurface1.SelectObjectTextColorInactive(exsurface1.SelectObjectTextColor());
	var_Elements = exsurface1.Elements(); com_Elements = var_Elements;
		var_Element = COM::createFromObject(com_Elements.Add("Element 1")); com_Element = var_Element;
		com_Element.Selected(true);
		var_Element = com_Elements.Add("Element 2"); com_Element = var_Element;
			com_Element.X(32);
			com_Element.Y(32);
}
83
Been playing with the surface control with the embedded ExGrid ActiveX...I can see most events coming through via the Surface control but I can't get the OnOLEStartDrag event to fire

// OleEvent event - Occurs once an inside control fires an event.
void onEvent_OleEvent(COM   _Element,COM   _Ev)
{
	// Ev.Param(1).Value = 2
	// Ev.Param(0).Value.SetData("items to be carried")
	;
	print( _Ev );
}

public void init()
{
	COM com_Columns,com_Element,com_Elements,com_Grid,com_Items;
	anytype var_Columns,var_Element,var_Elements,var_Grid,var_Items;
	;

	super();

	exsurface1.BeginUpdate();
	var_Elements = exsurface1.Elements(); com_Elements = var_Elements;
		var_Element = com_Elements.InsertControl("Exontrol.Grid"); com_Element = var_Element;
			com_Element.ElementFormat("\"client\"");
			// Add 'ExGrid 1.0 Control Library(ExGrid.dll)' reference to your project.
			var_Grid = com_Element.Object(); com_Grid = var_Grid;
				com_Grid.BeginUpdate();
				com_Grid.OLEDropMode(1/*exOLEDropManual*/);
				var_Columns = COM::createFromObject(com_Grid.Columns()); com_Columns = var_Columns;
				com_Columns.Add("Default");
				var_Items = COM::createFromObject(com_Grid.Items()); com_Items = var_Items;
				com_Items.AddItem("Click the item so it gets the focus");
				com_Grid.EndUpdate();
	exsurface1.MoveCorner(17/*exMiddleCenter*/,0/*exTopLeft*/);
	exsurface1.EndUpdate();
}
82
Is it possible to assign/add a percent to an element

public void init()
{
	COM com_Element,com_Elements;
	anytype var_Element,var_Elements;
	;

	super();

	var_Elements = exsurface1.Elements(); com_Elements = var_Elements;
		var_Element = com_Elements.Add("Element A"); com_Element = var_Element;
			com_Element.ID("A");
			com_Element.CaptionAlign(1/*exTopCenter*/);
			com_Element.AutoSize(false);
			com_Element.Height(36);
			com_Element.Width(96);
			com_Element.MinHeight(36);
			com_Element.BackgroundExt("none[(2,100%-15,100%-4,14)](left[50%,back=RGB(0,255,0),text=`15%`,align=0x11,pattern=6,frame])");
			com_Element.BackgroundExtValue(2/*exIndexExt2*/,2/*exClientExt*/,"75%");
			com_Element.BackgroundExtValue(2/*exIndexExt2*/,4/*exTextExt*/,com_Element.BackgroundExtValue(2/*exIndexExt2*/,2/*exClientExt*/));
}
81
How can I disable selecting the nodes/elements
public void init()
{
	;

	super();

	exsurface1.AllowSelectObject(0/*exDisallow*/);
	exsurface1.AllowSelectNothing(false);
	exsurface1.AllowSelectObjectRect(0/*exDisallow*/);
	exsurface1.AllowToggleSelectKey(0/*exDisallow*/);
}
80
How can I set my zooming levels on the control's toolbar

public void init()
{
	COM com_Element,com_Elements;
	anytype var_Element,var_Elements;
	;

	super();

	exsurface1.ZoomLevels("75,100,150,200");
	exsurface1.AllowLinkObjects(0/*exDisallow*/);
	var_Elements = exsurface1.Elements(); com_Elements = var_Elements;
		var_Element = COM::createFromObject(com_Elements.Add("Element A")); com_Element = var_Element;
		com_Element.ID("A");
		var_Element = COM::createFromObject(com_Elements.Add("Element B",COMVariant::createFromInt(96),COMVariant::createFromInt(24))); com_Element = var_Element;
		com_Element.ID("B");
		var_Element = COM::createFromObject(com_Elements.Add("Element C",COMVariant::createFromInt(48),COMVariant::createFromInt(12))); com_Element = var_Element;
		com_Element.BackColor(WinApi::RGB2int(255,255,255));
}
79
How can I prevent zooming the surface

public void init()
{
	;

	super();

	exsurface1.AllowZoomSurface(0/*exDisallow*/);
	exsurface1.AllowZoomWheelSurface(false);
	exsurface1.ToolBarFormat("-1,100");
}
78
How can I prevent adding the links
public void init()
{
	COM com_Element,com_Elements;
	anytype var_Element,var_Elements;
	;

	super();

	exsurface1.AllowLinkObjects(0/*exDisallow*/);
	var_Elements = exsurface1.Elements(); com_Elements = var_Elements;
		var_Element = COM::createFromObject(com_Elements.Add("Element A")); com_Element = var_Element;
		com_Element.ID("A");
		var_Element = COM::createFromObject(com_Elements.Add("Element B",COMVariant::createFromInt(96),COMVariant::createFromInt(24))); com_Element = var_Element;
		com_Element.ID("B");
		var_Element = COM::createFromObject(com_Elements.Add("Element C",COMVariant::createFromInt(48),COMVariant::createFromInt(12))); com_Element = var_Element;
		com_Element.BackColor(WinApi::RGB2int(255,255,255));
}
77
How can I fix all elements on the surface, so no moving or resizing is allowed

public void init()
{
	COM com_Element,com_Elements;
	anytype var_Element,var_Elements;
	;

	super();

	exsurface1.AllowResizeObject(0/*exDisallow*/);
	exsurface1.AllowMoveObject(0/*exDisallow*/);
	var_Elements = exsurface1.Elements(); com_Elements = var_Elements;
		var_Element = COM::createFromObject(com_Elements.Add("Element A")); com_Element = var_Element;
		com_Element.ID("A");
		var_Element = COM::createFromObject(com_Elements.Add("Element B",COMVariant::createFromInt(96),COMVariant::createFromInt(24))); com_Element = var_Element;
		com_Element.ID("B");
		var_Element = COM::createFromObject(com_Elements.Add("Element C",COMVariant::createFromInt(48),COMVariant::createFromInt(12))); com_Element = var_Element;
		com_Element.BackColor(WinApi::RGB2int(255,255,255));
}
76
How can I link elements with no pressing the SHIFT key
public void init()
{
	COM com_Element,com_Elements;
	anytype var_Element,var_Elements;
	;

	super();

	exsurface1.AllowInsertObject(false);
	exsurface1.AllowLinkObjects(1/*exLeftClick*/);
	exsurface1.AllowMoveObject(0/*exDisallow*/);
	var_Elements = exsurface1.Elements(); com_Elements = var_Elements;
		var_Element = COM::createFromObject(com_Elements.Add("Element A")); com_Element = var_Element;
		com_Element.ID("A");
		var_Element = COM::createFromObject(com_Elements.Add("Element B",COMVariant::createFromInt(96),COMVariant::createFromInt(24))); com_Element = var_Element;
		com_Element.ID("B");
		var_Element = COM::createFromObject(com_Elements.Add("Element C",COMVariant::createFromInt(48),COMVariant::createFromInt(12))); com_Element = var_Element;
		com_Element.BackColor(WinApi::RGB2int(255,255,255));
}
75
How can I disable creating the tree/hierarchies
public void init()
{
	COM com_Element,com_Elements;
	anytype var_Element,var_Elements;
	;

	super();

	exsurface1.AllowInsertObject(false);
	var_Elements = exsurface1.Elements(); com_Elements = var_Elements;
		var_Element = COM::createFromObject(com_Elements.Add("Element A")); com_Element = var_Element;
		com_Element.ID("A");
		var_Element = COM::createFromObject(com_Elements.Add("Element B",COMVariant::createFromInt(96),COMVariant::createFromInt(24))); com_Element = var_Element;
		com_Element.ID("B");
		var_Element = COM::createFromObject(com_Elements.Add("Element C",COMVariant::createFromInt(48),COMVariant::createFromInt(12))); com_Element = var_Element;
		com_Element.BackColor(WinApi::RGB2int(255,255,255));
}
74
How can I create new elements using simple clicks rather than double clicks

public void init()
{
	;

	super();

	exsurface1.AllowCreateObject(1/*exLeftClick*/);
}
73
How can I disable creating new elements at runtime
public void init()
{
	;

	super();

	exsurface1.AllowCreateObject(0/*exDisallow*/);
}
72
I've noticed that the links cut the elements. Is it possible to show the links on the back

public void init()
{
	COM com_Element,com_Elements,com_Links;
	anytype var_Element,var_Elements,var_Links;
	;

	super();

	exsurface1.ShowLinksType(2/*exLinkStraight*/);
	exsurface1.ShowLinks(1/*exShowExtendedLinks*/);
	var_Elements = exsurface1.Elements(); com_Elements = var_Elements;
		var_Element = COM::createFromObject(com_Elements.Add("Element A")); com_Element = var_Element;
		com_Element.ID("A");
		var_Element = COM::createFromObject(com_Elements.Add("Element B",COMVariant::createFromInt(96),COMVariant::createFromInt(24))); com_Element = var_Element;
		com_Element.ID("B");
		var_Element = COM::createFromObject(com_Elements.Add("Element C",COMVariant::createFromInt(48),COMVariant::createFromInt(12))); com_Element = var_Element;
		com_Element.BackColor(WinApi::RGB2int(255,255,255));
	var_Links = exsurface1.Links(); com_Links = var_Links;
		com_Links.Add(COM::createFromObject(exsurface1.Elements()).Item("A"),COM::createFromObject(exsurface1.Elements()).Item("B")).Caption("link");
}
71
How can I show a picture on the link

public void init()
{
	COM com_Element,com_Elements,com_Links;
	anytype var_Element,var_Elements,var_Links;
	;

	super();

	exsurface1.HTMLPicture("pic1","c:\\exontrol\\images\\zipdisk.gif");
	var_Elements = exsurface1.Elements(); com_Elements = var_Elements;
		var_Element = COM::createFromObject(com_Elements.Add("Element A")); com_Element = var_Element;
		com_Element.ID("A");
		var_Element = COM::createFromObject(com_Elements.Add("Element B",COMVariant::createFromInt(96),COMVariant::createFromInt(24))); com_Element = var_Element;
		com_Element.ID("B");
	var_Links = exsurface1.Links(); com_Links = var_Links;
		com_Links.Add(COM::createFromObject(exsurface1.Elements()).Item("A"),COM::createFromObject(exsurface1.Elements()).Item("B")).Caption("<img>pic1:24</img>");
	exsurface1.ShowLinksType(2/*exLinkStraight*/);
}
70
How can I show a caption on the link

public void init()
{
	COM com_Element,com_Elements,com_Links;
	anytype var_Element,var_Elements,var_Links;
	;

	super();

	var_Elements = exsurface1.Elements(); com_Elements = var_Elements;
		var_Element = COM::createFromObject(com_Elements.Add("Element A")); com_Element = var_Element;
		com_Element.ID("A");
		var_Element = COM::createFromObject(com_Elements.Add("Element B",COMVariant::createFromInt(96),COMVariant::createFromInt(24))); com_Element = var_Element;
		com_Element.ID("B");
	var_Links = exsurface1.Links(); com_Links = var_Links;
		com_Links.Add(COM::createFromObject(exsurface1.Elements()).Item("A"),COM::createFromObject(exsurface1.Elements()).Item("B")).Caption("link");
	exsurface1.ShowLinksType(2/*exLinkStraight*/);
}
69
I am using EBN to show my arrows, the question is if I can make it bigger/larger

public void init()
{
	COM com_Appearance,com_Element,com_Elements,com_Links;
	anytype var_Appearance,var_Element,var_Elements,var_Links;
	;

	super();

	var_Appearance = exsurface1.VisualAppearance(); com_Appearance = var_Appearance;
		com_Appearance.Add(1,"c:\\exontrol\\images\\normal.ebn");
		com_Appearance.Add(2,"CP:1 -2 -2 2 2");
	var_Elements = exsurface1.Elements(); com_Elements = var_Elements;
		var_Element = COM::createFromObject(com_Elements.Add("Element A")); com_Element = var_Element;
		com_Element.ID("A");
		var_Element = COM::createFromObject(com_Elements.Add("Element B",COMVariant::createFromInt(96),COMVariant::createFromInt(24))); com_Element = var_Element;
		com_Element.ID("B");
		var_Element = COM::createFromObject(com_Elements.Add("Element C",COMVariant::createFromInt(96),COMVariant::createFromInt(-24))); com_Element = var_Element;
		com_Element.ID("C");
	var_Links = exsurface1.Links(); com_Links = var_Links;
		com_Links.Add(COM::createFromObject(exsurface1.Elements()).Item("A"),COM::createFromObject(exsurface1.Elements()).Item("B"));
		com_Links.Add(COM::createFromObject(exsurface1.Elements()).Item("A"),COM::createFromObject(exsurface1.Elements()).Item("C"));
	exsurface1.LinksArrowColor(0x2000000);
}
68
Is it possible to show different type of arrows for links

public void init()
{
	COM com_Element,com_Elements,com_Links;
	anytype var_Element,var_Elements,var_Links;
	;

	super();

	exsurface1.VisualAppearance().Add(1,"c:\\exontrol\\images\\normal.ebn");
	var_Elements = exsurface1.Elements(); com_Elements = var_Elements;
		var_Element = COM::createFromObject(com_Elements.Add("Element A")); com_Element = var_Element;
		com_Element.ID("A");
		var_Element = COM::createFromObject(com_Elements.Add("Element B",COMVariant::createFromInt(96),COMVariant::createFromInt(24))); com_Element = var_Element;
		com_Element.ID("B");
		var_Element = COM::createFromObject(com_Elements.Add("Element C",COMVariant::createFromInt(96),COMVariant::createFromInt(-24))); com_Element = var_Element;
		com_Element.ID("C");
	var_Links = exsurface1.Links(); com_Links = var_Links;
		com_Links.Add(COM::createFromObject(exsurface1.Elements()).Item("A"),COM::createFromObject(exsurface1.Elements()).Item("B")).ArrowColor(WinApi::RGB2int(255,0,0));
		com_Links.Add(COM::createFromObject(exsurface1.Elements()).Item("A"),COM::createFromObject(exsurface1.Elements()).Item("C")).ArrowColor(0x1000000);
}
67
How can I remove or clear the entire surface
public void init()
{
	;

	super();

	exsurface1.Elements().Add("element");
	exsurface1.Elements().Clear();
	exsurface1.Home();
}
66
How can I programmatically add a child element, or create a tree/hierarchy

public void init()
{
	COM com_Element,com_Elements;
	anytype var_Element,var_Elements;
	;

	super();

	var_Elements = exsurface1.Elements(); com_Elements = var_Elements;
		var_Element = COM::createFromObject(com_Elements.Add("Root")); com_Element = var_Element;
		com_Element.ID("rootID");
		com_Elements.Insert("Child 1","rootID");
		var_Element = COM::createFromObject(com_Elements.Insert("Child 2","rootID")); com_Element = var_Element;
		com_Element.ID("childID");
		com_Elements.Insert("Child 3","rootID");
		com_Elements.Insert("Sub-Child 1.2","childID");
		com_Elements.Insert("Sub-Child 2.2","childID");
}
65
I've noticed that the element's background is transparent. Can I make it opaque

public void init()
{
	COM com_Element,com_Elements;
	anytype var_Element,var_Elements;
	;

	super();

	var_Elements = exsurface1.Elements(); com_Elements = var_Elements;
		var_Element = COM::createFromObject(com_Elements.Add("new 1")); com_Element = var_Element;
		com_Element.BackColor(WinApi::RGB2int(255,255,255));
		var_Element = COM::createFromObject(com_Elements.Add("new 1",COMVariant::createFromInt(24),COMVariant::createFromInt(24))); com_Element = var_Element;
		com_Element.BackColor(WinApi::RGB2int(240,240,240));
}
64
How can I add a resizable element
public void init()
{
	COM com_Element,com_Element1,com_Elements;
	anytype var_Element,var_Element1,var_Elements;
	;

	super();

	var_Elements = exsurface1.Elements(); com_Elements = var_Elements;
		var_Element = com_Elements.Add("new 1"); com_Element = var_Element;
			com_Element.AutoSize(false);
			com_Element.Resizable(true);
		var_Element1 = com_Elements.Add("new 1",COMVariant::createFromInt(24),COMVariant::createFromInt(24)); com_Element1 = var_Element1;
			com_Element1.AutoSize(false);
			com_Element1.Resizable(true);
}
63
How can I programmatically add a new element

public void init()
{
	COM com_Elements;
	anytype var_Elements;
	;

	super();

	var_Elements = exsurface1.Elements(); com_Elements = var_Elements;
		com_Elements.Add("new 1");
		com_Elements.Add("new 1",COMVariant::createFromInt(24),COMVariant::createFromInt(24));
}
62
Is it possible to assign a tooltip to an element

public void init()
{
	COM com_Element;
	anytype var_Element;
	;

	super();

	var_Element = COM::createFromObject(exsurface1.Elements()).Add("Element with a Tooltip"); com_Element = var_Element;
	com_Element.ToolTip("This is a bit of text that should be displayed when cursor hovers the element.");
}
61
How do I specify direct/straight link for all links

public void init()
{
	COM com_Elements,com_Links;
	anytype var_Elements,var_Links;
	;

	super();

	exsurface1.ShowLinksType(3/*exLinkStraight | exLinkDirect*/);
	var_Elements = exsurface1.Elements(); com_Elements = var_Elements;
		com_Elements.Add("Element <sha ;;0>A");
		com_Elements.Add("Element <sha ;;0>B",COMVariant::createFromInt(96),COMVariant::createFromInt(24));
	var_Links = exsurface1.Links(); com_Links = var_Links;
		com_Links.Add(COM::createFromObject(exsurface1.Elements()).Item(COMVariant::createFromInt(1)),COM::createFromObject(exsurface1.Elements()).Item(COMVariant::createFromInt(2)));
}
60
How do I show a direct/straight link

public void init()
{
	COM com_Elements,com_Links;
	anytype var_Elements,var_Links;
	;

	super();

	var_Elements = exsurface1.Elements(); com_Elements = var_Elements;
		com_Elements.Add("Element <sha ;;0>A");
		com_Elements.Add("Element <sha ;;0>B",COMVariant::createFromInt(96),COMVariant::createFromInt(24));
	var_Links = exsurface1.Links(); com_Links = var_Links;
		com_Links.Add(COM::createFromObject(exsurface1.Elements()).Item(COMVariant::createFromInt(1)),COM::createFromObject(exsurface1.Elements()).Item(COMVariant::createFromInt(2))).ShowLinkType(3/*exLinkStraight | exLinkDirect*/);
}
59
How can I ensure that a specified element fits the surface's visible area

public void init()
{
	COM com_Element,com_Elements,com_Pattern;
	anytype var_Element,var_Elements,var_Pattern;
	;

	super();

	var_Elements = exsurface1.Elements(); com_Elements = var_Elements;
		var_Element = COM::createFromObject(com_Elements.Add("Element A",COMVariant::createFromInt(-100))); com_Element = var_Element;
		var_Pattern = com_Element.Pattern(); com_Pattern = var_Pattern;
			com_Pattern.Type(6/*exPatternBDiagonal*/);
			com_Pattern.Color(WinApi::RGB2int(224,224,224));
		var_Element = COM::createFromObject(com_Elements.Add("Element B",COMVariant::createFromInt(2000))); com_Element = var_Element;
		com_Element.ScrollTo(17/*exMiddleCenter*/);
}
58
Is it possible to show a pattern like ( not available ) over an element

public void init()
{
	COM com_Element,com_Elements,com_Pattern;
	anytype var_Element,var_Elements,var_Pattern;
	;

	super();

	var_Elements = exsurface1.Elements(); com_Elements = var_Elements;
		var_Element = COM::createFromObject(com_Elements.Add("Element+Pattern",COMVariant::createFromInt(-100))); com_Element = var_Element;
		var_Pattern = com_Element.Pattern(); com_Pattern = var_Pattern;
			com_Pattern.Type(6/*exPatternBDiagonal*/);
			com_Pattern.Color(WinApi::RGB2int(224,224,224));
		com_Elements.Add("Element",COMVariant::createFromInt(100));
}
57
How can I specify a different overview color for the element

public void init()
{
	COM com_Element,com_Elements;
	anytype var_Element,var_Elements;
	;

	super();

	var_Elements = exsurface1.Elements(); com_Elements = var_Elements;
		var_Element = COM::createFromObject(com_Elements.Add("Element+A",COMVariant::createFromInt(-100))); com_Element = var_Element;
		com_Element.OverviewColor(WinApi::RGB2int(255,0,0));
		com_Elements.Add("Element+B",COMVariant::createFromInt(100));
	exsurface1.ScrollPos(true,512);
}
56
I've noticed that some lines are shown on the border, how can I get ride of them

public void init()
{
	COM com_Elements;
	anytype var_Elements;
	;

	super();

	var_Elements = exsurface1.Elements(); com_Elements = var_Elements;
		com_Elements.Add("Element+A",COMVariant::createFromInt(-100));
		com_Elements.Add("Element+B",COMVariant::createFromInt(100));
	exsurface1.ScrollPos(true,512);
	exsurface1.OverviewColor(-1);
}
55
How can I handle clicking an icon or a picture

// HandCursorClick event - The uses clicks a part of the element that shows the had cursor.
void onEvent_HandCursorClick(COM   _Element,int   _Hit,COMVariant   _Key)
{
	;
	print( _Key );
}

public void init()
{
	COM com_Element;
	anytype var_Element;
	str var_s;
	;

	super();

	var_s = "gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTql";
	var_s = var_s + "Vq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0";
	var_s = var_s + "ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/yN";
	var_s = var_s + "AOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=";
	exsurface1.Images(COMVariant::createFromStr(var_s));
	exsurface1.HTMLPicture("pic1","c:\\exontrol\\images\\zipdisk.gif");
	exsurface1.HTMLPicture("pic2","c:\\exontrol\\images\\auction.gif");
	var_Element = COM::createFromObject(exsurface1.Elements()).Add("Caption"); com_Element = var_Element;
		com_Element.Pictures("1,2/pic1/pic2");
		com_Element.PicturesAlign(33/*exBottomCenter*/);
		com_Element.ShowHandCursorOn(771/*exShowHandCursorExtraPictures | exShowHandCursorPictures | exShowHandCursorIcon | exShowHandCursorPicture*/);
		com_Element.CaptionAlign(1/*exTopCenter*/);
}
54
How can I display a picture

public void init()
{
	COM com_Element;
	anytype var_Element;
	;

	super();

	exsurface1.HTMLPicture("pic1","c:\\exontrol\\images\\zipdisk.gif");
	exsurface1.HTMLPicture("pic2","c:\\exontrol\\images\\auction.gif");
	var_Element = COM::createFromObject(exsurface1.Elements()).Add("Element"); com_Element = var_Element;
	com_Element.Pictures("pic1/pic2");
}
53
How can I display a picture

public void init()
{
	;

	super();

	exsurface1.HTMLPicture("pic1","c:\\exontrol\\images\\zipdisk.gif");
	exsurface1.HTMLPicture("pic2","c:\\exontrol\\images\\auction.gif");
	exsurface1.Elements().Add("Icon <img>pic1</img> or <img>pic2</img>");
}
52
How can I display an icon

public void init()
{
	COM com_Element;
	anytype var_Element;
	str var_s;
	;

	super();

	var_s = "gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTql";
	var_s = var_s + "Vq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0";
	var_s = var_s + "ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/yN";
	var_s = var_s + "AOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=";
	exsurface1.Images(COMVariant::createFromStr(var_s));
	var_Element = COM::createFromObject(exsurface1.Elements()).Add("Element"); com_Element = var_Element;
	com_Element.Pictures("0/1,2");
}
51
How can I display an icon

public void init()
{
	str var_s;
	;

	super();

	var_s = "gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTql";
	var_s = var_s + "Vq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0";
	var_s = var_s + "ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/yN";
	var_s = var_s + "AOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=";
	exsurface1.Images(COMVariant::createFromStr(var_s));
	exsurface1.Elements().Add("Icon <img>1</img> or <img>2</img>");
}
50
How can I prevent moving all descendent/outgoing elements when focused element is moved, more like a free move
public void init()
{
	COM com_Elements,com_Links;
	anytype var_Elements,var_Links;
	;

	super();

	var_Elements = exsurface1.Elements(); com_Elements = var_Elements;
		com_Elements.Add("Element <sha ;;0>A");
		com_Elements.Add("Element <sha ;;0>B",COMVariant::createFromInt(96),COMVariant::createFromInt(24));
	var_Links = exsurface1.Links(); com_Links = var_Links;
		com_Links.Add(COM::createFromObject(exsurface1.Elements()).Item(COMVariant::createFromInt(1)),COM::createFromObject(exsurface1.Elements()).Item(COMVariant::createFromInt(2)));
	exsurface1.ShowLinksType(3/*exLinkStraight | exLinkDirect*/);
	exsurface1.AllowMoveDescendents(false);
}
49
How can I display the +/- expand/collapse glyphs next to linked elements

public void init()
{
	COM com_Element,com_Elements,com_Links;
	anytype var_Element,var_Elements,var_Links;
	;

	super();

	var_Elements = exsurface1.Elements(); com_Elements = var_Elements;
		com_Elements.Add("Element <sha ;;0>A");
		com_Elements.Add("Element <sha ;;0>B",COMVariant::createFromInt(96),COMVariant::createFromInt(24));
	var_Links = exsurface1.Links(); com_Links = var_Links;
		com_Links.Add(COM::createFromObject(exsurface1.Elements()).Item(COMVariant::createFromInt(1)),COM::createFromObject(exsurface1.Elements()).Item(COMVariant::createFromInt(2)));
	var_Element = COM::createFromObject(exsurface1.Elements()).Item(COMVariant::createFromInt(1)); com_Element = var_Element;
	com_Element.Expanded(false);
	exsurface1.ExpandLinkedElements(true);
}
48
How can I host the Exontrol.Button inside the surface

public void init()
{
	COM com_Element,com_Elements,com_Object;
	anytype var_Element,var_Elements,var_Object;
	;

	super();

	var_Elements = exsurface1.Elements(); com_Elements = var_Elements;
		var_Element = com_Elements.Add("ActiveX"); com_Element = var_Element;
			com_Element.Type(2/*exElementHostControl*/);
			com_Element.ElementFormat("\"check\":18,\"client\"");
			com_Element.ShowCheckBox(true);
			com_Element.Control("Exontrol.Button");
			var_Object = COM::createFromObject(com_Element.Object()); com_Object = var_Object;
			com_Object.Caption("<sha ;;0>button");
			com_Element.Height(32);
			com_Element.Width(128);
}
47
How can I host a Command button

public void init()
{
	COM com_Element,com_Elements,com_Object;
	anytype var_Element,var_Elements,var_Object;
	;

	super();

	var_Elements = exsurface1.Elements(); com_Elements = var_Elements;
		var_Element = com_Elements.InsertControl("Forms.CommandButton.1"); com_Element = var_Element;
			com_Element.ElementFormat("\"check\":18,\"client\"");
			var_Object = COM::createFromObject(com_Element.Object()); com_Object = var_Object;
			com_Object.Caption("command");
			com_Element.ShowCheckBox(true);
			com_Element.Height(48);
			com_Element.Width(128);
}
46
How can I handle the events of the inner ActiveX control

// OleEvent event - Occurs once an inside control fires an event.
void onEvent_OleEvent(COM   _Element,COM   _Ev)
{
	;
	print( _Ev );
}

public void init()
{
	COM com_Element,com_Elements,com_Object;
	anytype var_Element,var_Elements,var_Object;
	;

	super();

	var_Elements = exsurface1.Elements(); com_Elements = var_Elements;
		var_Element = com_Elements.InsertControl("Forms.CommandButton.1"); com_Element = var_Element;
			com_Element.ElementFormat("\"check\":18,\"client\"");
			var_Object = COM::createFromObject(com_Element.Object()); com_Object = var_Object;
			com_Object.Caption("command");
			com_Element.ShowCheckBox(true);
			com_Element.Height(48);
			com_Element.Width(128);
}
45
How can I display a checkbox while my node hosts an ActiveX inside

public void init()
{
	COM com_Element,com_Elements,com_Object;
	anytype var_Element,var_Elements,var_Object;
	;

	super();

	var_Elements = exsurface1.Elements(); com_Elements = var_Elements;
		var_Element = com_Elements.InsertControl("Forms.CommandButton.1"); com_Element = var_Element;
			com_Element.ElementFormat("\"check\":18,\"client\"");
			var_Object = COM::createFromObject(com_Element.Object()); com_Object = var_Object;
			com_Object.Caption("command");
			com_Element.ShowCheckBox(true);
			com_Element.Height(48);
			com_Element.Width(128);
}
44
Is it possible to display a caption while the element hosts an ActiveX control

public void init()
{
	COM com_Element,com_Elements,com_Object;
	anytype var_Element,var_Elements,var_Object;
	;

	super();

	var_Elements = exsurface1.Elements(); com_Elements = var_Elements;
		var_Element = com_Elements.InsertControl("Forms.CommandButton.1"); com_Element = var_Element;
			com_Element.ElementFormat("18;\"caption\"/\"client\"");
			var_Object = COM::createFromObject(com_Element.Object()); com_Object = var_Object;
			com_Object.Caption("command");
			com_Element.Caption("Forms.CommandButton");
			com_Element.CaptionAlign(1/*exTopCenter*/);
			com_Element.Height(48);
			com_Element.Width(128);
}
43
I host an ActiveX control but it does not cover the whole element. What can be done

public void init()
{
	COM com_Element,com_Element1,com_Elements,com_Object;
	anytype var_Element,var_Element1,var_Elements,var_Object;
	;

	super();

	var_Elements = exsurface1.Elements(); com_Elements = var_Elements;
		var_Element = com_Elements.InsertControl("Forms.CommandButton.1"); com_Element = var_Element;
			com_Element.ElementFormat("\"client\"");
			var_Object = COM::createFromObject(com_Element.Object()); com_Object = var_Object;
			com_Object.Caption("command");
			com_Element.Height(32);
			com_Element.Width(128);
		var_Element1 = com_Elements.InsertControl("Forms.CommandButton.1"); com_Element1 = var_Element1;
			com_Element1.ElementFormat("\"client\"");
			var_Object = COM::createFromObject(com_Element1.Object()); com_Object = var_Object;
			com_Object.Caption("command");
			com_Element1.Height(32);
			com_Element1.Width(128);
}
42
How can I host my ActiveX to the surface (method 2)

public void init()
{
	COM com_Element,com_Elements,com_Object;
	anytype var_Element,var_Elements,var_Object;
	;

	super();

	var_Elements = exsurface1.Elements(); com_Elements = var_Elements;
		var_Element = com_Elements.InsertControl("Forms.CommandButton.1"); com_Element = var_Element;
			com_Element.ElementFormat("\"client\"");
			var_Object = COM::createFromObject(com_Element.Object()); com_Object = var_Object;
			com_Object.Caption("command");
			com_Element.Height(32);
			com_Element.Width(128);
}
41
How can I host my ActiveX to the surface (method 1)

public void init()
{
	COM com_Element,com_Elements,com_Object;
	anytype var_Element,var_Elements,var_Object;
	;

	super();

	var_Elements = exsurface1.Elements(); com_Elements = var_Elements;
		var_Element = com_Elements.Add("ActiveX"); com_Element = var_Element;
			com_Element.Type(2/*exElementHostControl*/);
			com_Element.ElementFormat("\"client\"");
			com_Element.Control("Forms.CommandButton.1");
			var_Object = COM::createFromObject(com_Element.Object()); com_Object = var_Object;
			com_Object.Caption("command");
			com_Element.Height(32);
			com_Element.Width(128);
}
40
How can I define the elements with a solid color on the background

public void init()
{
	COM com_Elements;
	anytype var_Elements;
	;

	super();

	exsurface1.Background(88/*exElementBorderColor*/,-1);
	exsurface1.Background(89/*exElementStatusColor*/,-1);
	exsurface1.Background(90/*exElementBackColor*/,WinApi::RGB2int(255,0,0));
	var_Elements = exsurface1.Elements(); com_Elements = var_Elements;
		com_Elements.Add("Node A");
		com_Elements.Add("Node B",COMVariant::createFromInt(96),COMVariant::createFromInt(24));
}
39
Can I display the status to a different part of the element

public void init()
{
	COM com_Element;
	anytype var_Element;
	;

	super();

	var_Element = COM::createFromObject(exsurface1.Elements()).Add("Node"); com_Element = var_Element;
	com_Element.StatusAlign(3/*exAlignBottom*/);
}
38
How can I remove or hide the status part of the event

// AddElement event - A new element has been added to the surface.
void onEvent_AddElement(COM   _Element)
{
	// Element.StatusSize = 0
	;
}

public void init()
{
	COM com_Elements;
	anytype var_Elements;
	;

	super();

	exsurface1.Background(89/*exElementStatusColor*/,-1);
	var_Elements = exsurface1.Elements(); com_Elements = var_Elements;
		com_Elements.Add("Node A");
		com_Elements.Add("Node B",COMVariant::createFromInt(96),COMVariant::createFromInt(24));
}
37
How can I change the visual appearance of the border for all elements

public void init()
{
	COM com_Elements;
	anytype var_Elements;
	;

	super();

	exsurface1.VisualAppearance().Add(1,"c:\\exontrol\\images\\normal.ebn");
	exsurface1.Background(88/*exElementBorderColor*/,0x1000000);
	var_Elements = exsurface1.Elements(); com_Elements = var_Elements;
		com_Elements.Add("Element+A");
		com_Elements.Add("Element+B",COMVariant::createFromInt(96),COMVariant::createFromInt(24));
}
36
How can I change the color of the border for all elements

public void init()
{
	COM com_Elements;
	anytype var_Elements;
	;

	super();

	exsurface1.Background(88/*exElementBorderColor*/,WinApi::RGB2int(0,255,0));
	var_Elements = exsurface1.Elements(); com_Elements = var_Elements;
		com_Elements.Add("Element+A");
		com_Elements.Add("Element+B",COMVariant::createFromInt(96),COMVariant::createFromInt(24));
}
35
How can I remove the border for all elements

public void init()
{
	COM com_Elements;
	anytype var_Elements;
	;

	super();

	exsurface1.Background(88/*exElementBorderColor*/,-1);
	var_Elements = exsurface1.Elements(); com_Elements = var_Elements;
		com_Elements.Add("Element+A");
		com_Elements.Add("Element+B",COMVariant::createFromInt(96),COMVariant::createFromInt(24));
}
34
How do I change the visual appearance the glpyh that shows when the element is added as a child

public void init()
{
	COM com_Elements;
	anytype var_Elements;
	;

	super();

	exsurface1.VisualAppearance().Add(1,"c:\\exontrol\\images\\normal.ebn");
	exsurface1.VisualAppearance().Add(2,"c:\\exontrol\\images\\pushed.ebn");
	exsurface1.Background(86/*exHoverInsertObject*/,0x1000000);
	exsurface1.Background(87/*exHoverInsertObjectGlyph*/,0x2000000);
	var_Elements = exsurface1.Elements(); com_Elements = var_Elements;
		com_Elements.Add("Element <sha ;;0>A");
		com_Elements.Add("Element <sha ;;0>B",COMVariant::createFromInt(96),COMVariant::createFromInt(24));
}
33
Is it possible to change the color for the glpyh that shows when the element is added as a child

public void init()
{
	COM com_Elements;
	anytype var_Elements;
	;

	super();

	exsurface1.Background(86/*exHoverInsertObject*/,WinApi::RGB2int(255,0,0));
	exsurface1.Background(87/*exHoverInsertObjectGlyph*/,WinApi::RGB2int(255,0,0));
	var_Elements = exsurface1.Elements(); com_Elements = var_Elements;
		com_Elements.Add("Element <sha ;;0>A");
		com_Elements.Add("Element <sha ;;0>B",COMVariant::createFromInt(96),COMVariant::createFromInt(24));
}
32
How can I change the color to show a valid link

public void init()
{
	COM com_Elements;
	anytype var_Elements;
	;

	super();

	exsurface1.Background(83/*exLinkObjectsValidColor*/,WinApi::RGB2int(0,255,0));
	var_Elements = exsurface1.Elements(); com_Elements = var_Elements;
		com_Elements.Add("Element <sha ;;0>A");
		com_Elements.Add("Element <sha ;;0>B",COMVariant::createFromInt(96),COMVariant::createFromInt(24));
}
31
How can I change the color to show an invalid link

public void init()
{
	COM com_Elements;
	anytype var_Elements;
	;

	super();

	exsurface1.Background(82/*exLinkObjectsInvalidColor*/,WinApi::RGB2int(0,255,0));
	var_Elements = exsurface1.Elements(); com_Elements = var_Elements;
		com_Elements.Add("Element <sha ;;0>A");
		com_Elements.Add("Element <sha ;;0>B",COMVariant::createFromInt(96),COMVariant::createFromInt(24));
}
30
How can I disable adding the elements as child of other nodes
public void init()
{
	COM com_Elements;
	anytype var_Elements;
	;

	super();

	exsurface1.AllowInsertObject(false);
	var_Elements = exsurface1.Elements(); com_Elements = var_Elements;
		com_Elements.Add("Element <sha ;;0>A");
		com_Elements.Add("Element <sha ;;0>B",COMVariant::createFromInt(96),COMVariant::createFromInt(24));
}
29
How can I prevent moving the outgoing /descendents elements when moving an element
public void init()
{
	COM com_Elements,com_Links;
	anytype var_Elements,var_Links;
	;

	super();

	exsurface1.ShowLinksType(3/*exLinkStraight | exLinkDirect*/);
	exsurface1.AllowMoveDescendents(false);
	var_Elements = exsurface1.Elements(); com_Elements = var_Elements;
		com_Elements.Add("Element <sha ;;0>A");
		com_Elements.Add("Element <sha ;;0>B",COMVariant::createFromInt(96),COMVariant::createFromInt(24));
	var_Links = exsurface1.Links(); com_Links = var_Links;
		com_Links.Add(COM::createFromObject(exsurface1.Elements()).Item(COMVariant::createFromInt(1)),COM::createFromObject(exsurface1.Elements()).Item(COMVariant::createFromInt(2)));
}
28
How can I add programatically a link

public void init()
{
	COM com_Elements,com_Links;
	anytype var_Elements,var_Links;
	;

	super();

	var_Elements = exsurface1.Elements(); com_Elements = var_Elements;
		com_Elements.Add("Element <sha ;;0>A");
		com_Elements.Add("Element <sha ;;0>B",COMVariant::createFromInt(96),COMVariant::createFromInt(24));
	var_Links = exsurface1.Links(); com_Links = var_Links;
		com_Links.Add(COM::createFromObject(exsurface1.Elements()).Item(COMVariant::createFromInt(1)),COM::createFromObject(exsurface1.Elements()).Item(COMVariant::createFromInt(2)));
}
27
How do I prevent adding a link between elements
public void init()
{
	COM com_Elements;
	anytype var_Elements;
	;

	super();

	exsurface1.AllowLinkObjects(0/*exDisallow*/);
	var_Elements = exsurface1.Elements(); com_Elements = var_Elements;
		com_Elements.Add("Element <sha ;;0>A");
		com_Elements.Add("Element <sha ;;0>B",COMVariant::createFromInt(96),COMVariant::createFromInt(24));
}
26
How can I hide the 100% button ( zoom ) on the control's toolbar

public void init()
{
	;

	super();

	exsurface1.ToolBarFormat("-1,100");
}
25
Is it possible to hide the Home button on the control's toolbar

public void init()
{
	;

	super();

	exsurface1.ToolBarFormat("-1,101");
}
24
How can I hide the grid lines, including the axis

public void init()
{
	;

	super();

	exsurface1.ShowGridLines(false);
	exsurface1.AxisStyle(-1/*exNoLines*/);
}
23
How can I hide the grid lines

public void init()
{
	;

	super();

	exsurface1.ShowGridLines(false);
}
22
How can I clear the images shown on the control's toolbar

public void init()
{
	;

	super();

	exsurface1.ToolBarReplaceIcon(COMVariant::createFromInt(0),COMVariant::createFromInt(-1));
	exsurface1.ToolBarRefresh();
}
21
How can I replace the default icons shown on the control's toolbar

public void init()
{
	str var_s;
	;

	super();

	exsurface1.ToolBarReplaceIcon(COMVariant::createFromInt(0),COMVariant::createFromInt(-1));
	var_s = "gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTql";
	var_s = var_s + "Vq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0";
	var_s = var_s + "ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/yN";
	var_s = var_s + "AOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=";
	exsurface1.ToolBarImages(COMVariant::createFromStr(var_s));
}
20
How can I replace the default icons shown on the control's toolbar

public void init()
{
	str var_s;
	;

	super();

	var_s = "gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTql";
	var_s = var_s + "Vq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0";
	var_s = var_s + "ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/yN";
	var_s = var_s + "AOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=";
	exsurface1.ToolBarImages(COMVariant::createFromStr(var_s));
	exsurface1.ToolBarCaption(100,"<img>3</img> aka1");
}
19
How can I add an anchor element to the control's toolbar

// ToolBarAnchorClick event - Occurs when an anchor element is clicked, on the control's toolbar.
void onEvent_ToolBarAnchorClick(str   _AnchorID,str   _Options)
{
	;
	print( _AnchorID );
}

public void init()
{
	;

	super();

	exsurface1.ToolBarFormat("-1,100,101,|,102");
	exsurface1.ToolBarCaption(102,"<a a1>anchor</a>");
}
18
How can I add a button/image to the control's toolbar

// ToolBarClick event - Occurs when the user clicks a button in the toolbar.
void onEvent_ToolBarClick(int   _ID,int   _SelectedID)
{
	;
	print( _ID );
}

public void init()
{
	str var_s;
	;

	super();

	var_s = "gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTql";
	var_s = var_s + "Vq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0";
	var_s = var_s + "ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/yN";
	var_s = var_s + "AOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=";
	exsurface1.ToolBarImages(COMVariant::createFromStr(var_s));
	exsurface1.ToolBarFormat("-1,100,101,102");
	exsurface1.ToolBarCaption(102,"<img>3</img> new");
}
17
How can I add a button to the control's toolbar

// ToolBarClick event - Occurs when the user clicks a button in the toolbar.
void onEvent_ToolBarClick(int   _ID,int   _SelectedID)
{
	;
	print( _ID );
}

public void init()
{
	;

	super();

	exsurface1.ToolBarFormat("-1,100,101,102");
	exsurface1.ToolBarCaption(102,"<sha ;;0>new");
}
16
How can I hide the control's toolbar

public void init()
{
	;

	super();

	exsurface1.ToolBarVisible(false);
}
15
How can I prevent selecting the elements
public void init()
{
	;

	super();

	exsurface1.AllowSelectObject(0/*exDisallow*/);
	exsurface1.AllowSelectObjectRect(0/*exDisallow*/);
	exsurface1.AllowToggleSelectKey(0/*exDisallow*/);
	exsurface1.Elements().Add("element");
}
14
How can I show the selected elements the same as the control has the focus

public void init()
{
	COM com_Element;
	anytype var_Element;
	;

	super();

	exsurface1.HideSel(false);
	exsurface1.SelectObjectColorInactive(exsurface1.SelectObjectColor());
	exsurface1.SelectObjectTextColorInactive(exsurface1.SelectObjectTextColor());
	var_Element = COM::createFromObject(exsurface1.Elements()).Add("element"); com_Element = var_Element;
	com_Element.Selected(true);
}
13
How can I show the selected elements with a different border

public void init()
{
	COM com_Element;
	anytype var_Element;
	;

	super();

	exsurface1.VisualAppearance().Add(1,"c:\\exontrol\\images\\normal.ebn");
	exsurface1.HideSel(false);
	exsurface1.SelectObjectStyle(48/*exLinesSolid*/);
	exsurface1.SelectObjectColor(0x1000000);
	exsurface1.SelectObjectTextColor(WinApi::RGB2int(0,0,0));
	exsurface1.SelectObjectColorInactive(exsurface1.SelectObjectColor());
	exsurface1.SelectObjectTextColorInactive(exsurface1.SelectObjectTextColor());
	var_Element = COM::createFromObject(exsurface1.Elements()).Add("element"); com_Element = var_Element;
	com_Element.Selected(true);
}
12
How can I show the selected elements with a different background color

public void init()
{
	COM com_Element;
	anytype var_Element;
	;

	super();

	exsurface1.HideSel(false);
	exsurface1.SelectObjectStyle(-1/*exNoLines*/);
	exsurface1.SelectObjectColor(WinApi::RGB2int(255,0,0));
	exsurface1.SelectObjectTextColor(WinApi::RGB2int(255,255,255));
	exsurface1.SelectObjectColorInactive(exsurface1.SelectObjectColor());
	exsurface1.SelectObjectTextColorInactive(exsurface1.SelectObjectTextColor());
	var_Element = COM::createFromObject(exsurface1.Elements()).Add("element"); com_Element = var_Element;
	com_Element.Selected(true);
}
11
Is it possible to add an inner control on the surface

// OleEvent event - Occurs once an inside control fires an event.
void onEvent_OleEvent(COM   _Element,COM   _Ev)
{
	;
	print( _Ev );
}

public void init()
{
	COM com_Element,com_Elements;
	anytype var_Element,var_Elements;
	;

	super();

	var_Elements = exsurface1.Elements(); com_Elements = var_Elements;
		var_Element = com_Elements.Add("activex hosting"); com_Element = var_Element;
			com_Element.Type(2/*exElementHostControl*/);
			com_Element.Control("Forms.CommandButton.1");
			com_Element.Caption("Command Button");
			com_Element.Height(64);
			com_Element.Width(128);
			com_Element.ElementFormat("14;\"caption\"/\"client\"");
			com_Element.CaptionAlign(1/*exTopCenter*/);
}
10
How can I make the control read-only
// LayoutStartChanging event - Occurs when the control's layout is about to be changed.
void onEvent_LayoutStartChanging(int   _Operation)
{
	;
	print( _Operation );
	exsurface1.CancelLayoutChanging();
}

public void init()
{
	COM com_Elements;
	anytype var_Elements;
	;

	super();

	var_Elements = exsurface1.Elements(); com_Elements = var_Elements;
		com_Elements.Add("new element");
}
9
How can I handle clicking a picture on the element

// HandCursorClick event - The uses clicks a part of the element that shows the had cursor.
void onEvent_HandCursorClick(COM   _Element,int   _Hit,COMVariant   _Key)
{
	;
	print( _Key );
}

public void init()
{
	COM com_Element,com_Elements;
	anytype var_Element,var_Elements;
	str var_s;
	;

	super();

	var_s = "gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTql";
	var_s = var_s + "Vq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0";
	var_s = var_s + "ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/yN";
	var_s = var_s + "AOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=";
	exsurface1.Images(COMVariant::createFromStr(var_s));
	var_Elements = exsurface1.Elements(); com_Elements = var_Elements;
		var_Element = com_Elements.Add("new element"); com_Element = var_Element;
			com_Element.CaptionAlign(2/*exTopRight*/);
			com_Element.PicturesAlign(0/*exTopLeft*/);
			com_Element.ShowHandCursorOn(3335/*exShowHandCursorAnchorAll | exShowHandCursorPictures | exShowHandCursorIcon | exShowHandCursorPicture*/);
			com_Element.Pictures("0,1,2");
}
8
How can I show the hand cursor when user hovers the element's image

// HandCursorClick event - The uses clicks a part of the element that shows the had cursor.
void onEvent_HandCursorClick(COM   _Element,int   _Hit,COMVariant   _Key)
{
	;
	print( _Key );
}

public void init()
{
	COM com_Element,com_Elements;
	anytype var_Element,var_Elements;
	str var_s;
	;

	super();

	var_s = "gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTql";
	var_s = var_s + "Vq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0";
	var_s = var_s + "ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/yN";
	var_s = var_s + "AOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=";
	exsurface1.Images(COMVariant::createFromStr(var_s));
	var_Elements = exsurface1.Elements(); com_Elements = var_Elements;
		var_Element = com_Elements.Add("new element"); com_Element = var_Element;
			com_Element.CaptionAlign(2/*exTopRight*/);
			com_Element.PicturesAlign(0/*exTopLeft*/);
			com_Element.ShowHandCursorOn(3335/*exShowHandCursorAnchorAll | exShowHandCursorPictures | exShowHandCursorIcon | exShowHandCursorPicture*/);
			com_Element.Pictures("0,1,2");
}
7
How can I show the hand cursor when user hovers the element's checkbox

public void init()
{
	COM com_Element,com_Elements;
	anytype var_Element,var_Elements;
	;

	super();

	var_Elements = exsurface1.Elements(); com_Elements = var_Elements;
		var_Element = com_Elements.Add("new element"); com_Element = var_Element;
			com_Element.CaptionAlign(2/*exTopRight*/);
			com_Element.CheckBoxAlign(0/*exTopLeft*/);
			com_Element.ShowCheckBox(true);
			com_Element.ShowHandCursorOn(3084/*exShowHandCursorAnchorAll | exShowHandCursorCheck*/);
}
6
How can I remove the status part for all elements

// AddElement event - A new element has been added to the surface.
void onEvent_AddElement(COM   _Element)
{
	// Element.StatusSize = 0
	;
}

public void init()
{
	;

	super();

	exsurface1.Background(89/*exElementStatusColor*/,-1);
	exsurface1.Elements().Add("new element");
}
5
How can I remove the border for all elements

public void init()
{
	;

	super();

	exsurface1.Background(88/*exElementBorderColor*/,-1);
	exsurface1.Elements().Add("new element");
}
4
How do I edit the element's caption once the user creates the element

// CreateElement event - The user creates at runtime a new element.
void onEvent_CreateElement(COM   _Element)
{
	// Element.Edit(0)
	// Element.AutoSize = True
	;
}

public void init()
{
	;

	super();

}
3
How can I align the element's checkbox next to the text

public void init()
{
	COM com_Element,com_Elements;
	anytype var_Element,var_Elements;
	;

	super();

	exsurface1.BeginUpdate();
	var_Elements = exsurface1.Elements(); com_Elements = var_Elements;
		var_Element = com_Elements.Add("text"); com_Element = var_Element;
			com_Element.ShowCheckBox(true);
			com_Element.CaptionAlign(2/*exTopRight*/);
			com_Element.CheckBoxAlign(0/*exTopLeft*/);
	exsurface1.EndUpdate();
}
2
How can I assign a check-box to all elements

// AddElement event - A new element has been added to the surface.
void onEvent_AddElement(COM   _Element)
{
	// Element.ShowCheckBox = True
	;
}

public void init()
{
	COM com_Element,com_Elements;
	anytype var_Element,var_Elements;
	;

	super();

	exsurface1.BeginUpdate();
	var_Elements = exsurface1.Elements(); com_Elements = var_Elements;
		com_Elements.Add("",COMVariant::createFromInt(-24),COMVariant::createFromInt(-24));
		var_Element = COM::createFromObject(com_Elements.Add("")); com_Element = var_Element;
		com_Element.Checked(1/*exChecked*/);
	exsurface1.Home();
	exsurface1.EndUpdate();
}
1
How do I change the control's background color

public void init()
{
	;

	super();

	exsurface1.BackColor(WinApi::RGB2int(240,240,240));
}